<?php
/* @var $this BlogController */
/* @var $model Blog */
/* @var $form CActiveForm  */

$this->pageTitle = Yii::app()->name . ' - Tạo Blog';
?>
<h1>Tạo Blog</h1>

<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'collection-form',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    ?>
    <div class="row">
        <?php echo $form->labelEx($model, 'title'); ?>
        <?php echo $form->textField($model, 'title'); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'content'); ?>
        <?php echo $form->textArea($model, 'content', array('rows' => 6, 'cols' => 77, 'id' => 'blog_content')); ?>
        <?php echo $form->error($model, 'content'); ?>
    </div>
    <script>
        CKEDITOR.replace('blog_content');
    </script>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Tạo mới'); ?>
    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->
